package com.pft.web.view.contract;

import android.content.Intent;
import android.net.Uri;
import android.webkit.WebView;

/**
 * WebView契约类
 *
 * @author lijianqing
 */

public class WebViewContract {

    public interface View {

        void showFilePickerPage(Intent intent);

        void showLoadProgress(int progress);

        void showTitle(String title);


        void showSuccessView();

        void showFailedView();

        void setCloseVisibility(int visibility);


        void showCallphonePage(Uri uri);

        void closeWebContainer();

        void showLoadingView(String loading);

        void dismissLoadingView();

        void startLocation();


        WebView getWebView();


        void showScanQrCode();


        void bluetoothPrint(String data);

        void clearMemory();

    }

    public interface Presenter {

        void setupWebView(WebView webView);

        void loadStartUrl(WebView webView, String url);

        void reloadUrl(WebView webView);

        void goBack(WebView webView);

        void destroy();

        void gainFilePicker(int resultCode, Intent intent);

        void gainScanQrCode(WebView webView, int resultCode, String data);

        void gainGps(int state,double lat,double lng);
    }
}
